package cn.iocoder.yudao.module.member.enums;

import cn.hutool.core.util.EnumUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Objects;

/**
 * 设备系统来源 枚举类  与数据字典保持一致
 */
@Getter
@AllArgsConstructor
public enum SysFlagEnum {
    /**
     * 设备池类型
     */
    CURSTATION("curStation", "本站"),
    PRIVATE("private", "独立池"),
    SYNC("sync","苹果"),
    USER_UPLOAD("userUpload","用户上传"),
    XIN_HANG("xin_hang","星桁签"),
    HUA_YANG("hua_yang","华阳签"),
    HUA_YANG_V2("hua_yang_v2","华阳签版本2"),
    YUN_TEN("yun_ten","云腾"),
    ;

    /**
     * 业务类型
     */
    private final String type;
    /**
     * 标题
     */
    private final String title;



    public static SysFlagEnum getByType(String type) {
        return EnumUtil.getBy(SysFlagEnum.class,
                e -> Objects.equals(type, e.getType()));
    }
}
